package com.jc.ds.model;

import java.util.Date;

/**
 * pull_product_log
 * @author 
 */
public class PullProductLog extends BaseValueObject {
    /**
     * id
     */
    private Long id;

    /**
     * 产品SKU表id
     */
    private Long productId;

    /**
     * 第三方产品SKU表id
     */
    private Long productPid;

    /**
     * 类型对不上出错 'Y':'是'  'N': '否'
     */
    private String isProductType;

    /**
     * 属性对不上出错  'Y':'是'  'N': '否'
     */
    private String isProductAttribute;

    /**
     * 属性值对不上出错 'Y': '是'  'N': '否'
     */
    private String isProductAttributeValue;

    /**
     * 对不上的类型的文字描述
     */
    private String productTypeText;

    /**
     * 对不上的属性的文字描述
     */
    private String productAttributeText;

    /**
     * 对不上的属性值的文字描述
     */
    private String productAttributeValueText;

    /**
     * 创建时间
     */
    private Date createTime;

    private String orderStr = null;

    public String getIsProductAttribute() {
        return isProductAttribute;
    }

    public void setIsProductAttribute(String isProductAttribute) {
        this.isProductAttribute = isProductAttribute;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductPid() {
        return productPid;
    }

    public void setProductPid(Long productPid) {
        this.productPid = productPid;
    }

    public String getIsProductType() {
        return isProductType;
    }

    public void setIsProductType(String isProductType) {
        this.isProductType = isProductType;
    }

    public String getIsProductAttributeValue() {
        return isProductAttributeValue;
    }

    public void setIsProductAttributeValue(String isProductAttributeValue) {
        this.isProductAttributeValue = isProductAttributeValue;
    }

    public String getProductTypeText() {
        return productTypeText;
    }

    public void setProductTypeText(String productTypeText) {
        this.productTypeText = productTypeText;
    }

    public String getProductAttributeText() {
        return productAttributeText;
    }

    public void setProductAttributeText(String productAttributeText) {
        this.productAttributeText = productAttributeText;
    }

    public String getProductAttributeValueText() {
        return productAttributeValueText;
    }

    public void setProductAttributeValueText(String productAttributeValueText) {
        this.productAttributeValueText = productAttributeValueText;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByProductId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_id asc";
            }else{
                this.orderStr = this.orderStr + ",product_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_id desc";
            }else{
                this.orderStr = this.orderStr + ",product_id desc";
            }
        }
    }

    public void orderByProductPid(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_pid asc";
            }else{
                this.orderStr = this.orderStr + ",product_pid asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_pid desc";
            }else{
                this.orderStr = this.orderStr + ",product_pid desc";
            }
        }
    }

    public void orderByIsProductType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_product_type asc";
            }else{
                this.orderStr = this.orderStr + ",is_product_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_product_type desc";
            }else{
                this.orderStr = this.orderStr + ",is_product_type desc";
            }
        }
    }

    public void orderByIsProdcutAttribute(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_prodcut_attribute asc";
            }else{
                this.orderStr = this.orderStr + ",is_prodcut_attribute asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_prodcut_attribute desc";
            }else{
                this.orderStr = this.orderStr + ",is_prodcut_attribute desc";
            }
        }
    }

    public void orderByIsProductAttributeValue(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_product_attribute_value asc";
            }else{
                this.orderStr = this.orderStr + ",is_product_attribute_value asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_product_attribute_value desc";
            }else{
                this.orderStr = this.orderStr + ",is_product_attribute_value desc";
            }
        }
    }

    public void orderByProductTypeText(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_type_text asc";
            }else{
                this.orderStr = this.orderStr + ",product_type_text asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_type_text desc";
            }else{
                this.orderStr = this.orderStr + ",product_type_text desc";
            }
        }
    }

    public void orderByProdcutAttributeText(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by prodcut_attribute_text asc";
            }else{
                this.orderStr = this.orderStr + ",prodcut_attribute_text asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by prodcut_attribute_text desc";
            }else{
                this.orderStr = this.orderStr + ",prodcut_attribute_text desc";
            }
        }
    }

    public void orderByProductAttributeValueText(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_attribute_value_text asc";
            }else{
                this.orderStr = this.orderStr + ",product_attribute_value_text asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_attribute_value_text desc";
            }else{
                this.orderStr = this.orderStr + ",product_attribute_value_text desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }
}